#ifndef QCOMBOBOXSEARCH_H
#define QCOMBOBOXSEARCH_H

#include <QWidget>
#include <QComboBox>
#include <QStringListModel>
#include <QSortFilterProxyModel>
#include <QCompleter>
namespace Ui {
class QComboBoxSearch;
}

class QComboBoxSearch : public QComboBox
{
    Q_OBJECT

public:
    explicit QComboBoxSearch(QWidget *parent = nullptr);
    ~QComboBoxSearch();

private:
    Ui::QComboBoxSearch *ui;

    QSortFilterProxyModel *filterModel;
    QCompleter *completer;
protected:
    // 重写按键事件处理函数
    void keyPressEvent(QKeyEvent *event) override;
private slots:

    void on_ui_box_editTextChanged(const QString &arg1);
};

#endif // QCOMBOBOXSEARCH_H
